import request from '@/utils/request'

// 后台登录
export function login(data) {
  return request({
    url: '/adm/adm/login',
    method: 'post',
    data
  })
}

// 获取用户信息
export function getInfo(token) {
  return request({
    url: '/adm/adm/userInfo',
    method: 'get',
    params: { token }
  })
}

// 登出
export function logout() {
  return request({
    url: '/adm/adm/logout',
    method: 'post'
  })
}

// 验证码地址
export function getCaptcha() {
  return request({
    url: '/adm/adm/captcha',
    method: 'get'
  })
}
